<div class="container-fluid" style="margin: 0px 15px 0px 15px;">
<ol class="breadcrumb">
  <li><a href="<?php echo base_url('/index.php/inicio');?>">Início</a></li>
  <li><a href="<?php echo base_url('index.php/processos/consulta');?>">Processo</a></li>
  <li class="active">Relatório Anual de Processos</li>
</ol>
			<fieldset>
			<legend>Relatório Anual de Processos</legend>
				<?php 
					$attributes = array('class' => 'form-horizontal', 'role' => 'form', 'id' => 'form', 'target'=>'_blank');
					
					echo form_open('processos/relatorioanual',$attributes); 
				?>
				<!--<div class="form-group">
					<label for="" class="col-sm-2 control-label">Advogado</label>
					<div class="col-sm-2">
						<?php 
							$usuario[999] = ' -- TODOS --';
							$class = 'class="form-control input-sm"';
							echo form_dropdown('usuario', $usuario,'999',$class);
							
						?>
					</div>
					<div class="col-sm-2 control-label" style="text-align:left;color:red;">
					<?php echo form_error('usuario');?>	
					</div>	
				</div>
				<div class="form-group">
					<label for="" class="col-sm-2 control-label">Tipo Processo</label>
					<div class="col-sm-2">
						<?php 
							$tipoprocesso[999] = ' -- TODOS --';
							$class = 'class="form-control input-sm"';
							echo form_dropdown('tipo_processo', $tipoprocesso, '999',$class);
							
						?>
					</div>
					<div class="col-sm-2 control-label" style="text-align:left;color:red;">
					<?php echo form_error('tipo_processo');?>	
					</div>	
				</div>
				<div class="form-group">
					<label for="" class="col-sm-2 control-label">Tipo Movimentação</label>
					<div class="col-sm-2">
						<?php 
							$evento[999] = ' -- TODOS --';
							$class = 'class="form-control input-sm"';
							echo form_dropdown('evento', $evento, '999',$class);
							
						?>
					</div>
					<div class="col-sm-2 control-label" style="text-align:left;color:red;">
					<?php echo form_error('tipo_processo');?>	
					</div>	
				</div>
				-->
				<!--
				<div class="form-group">
					<label for="" class="col-sm-2 control-label">Status</label>
					<div class="col-sm-2">
						<?php 
							$options = array('1'=>'ANDAMENTO','2'=>'ARQUIVADO');
							$class = 'class="form-control"';
							echo form_dropdown('status', $options, '1',$class);
							
						?>
					</div>
					<div class="col-sm-2 control-label" style="text-align:left;color:red;">
					<?php echo form_error('status');?>	
					</div>	
				</div>-->
				<div class="form-group">
				<label for="inputPassword3" class="col-sm-2 control-label">Data Início</label>
				<div class="col-sm-2">
				<?php 
					$data = array('name'=> 'inicio','id'=> 'inicio','value'=>'','placeholder'=> 'Data Início','class'=> 'form-control input-sm');
					echo form_input($data);
				?>
				</div>
				</div>
				<div class="form-group">
				<label for="inputPassword3" class="col-sm-2 control-label">Data Fim</label>
				<div class="col-sm-2">
				<?php 
					$data = array('name'=> 'fim','id'=> 'fim','value'=>'','placeholder'=> 'Data Fim','class'=> 'form-control input-sm');
					echo form_input($data);
				?>
				</div>
				</div>
				<div class="form-group">
				<div class="col-sm-offset-2 col-sm-10">
				<?php 
					$data = array('name'=>'salvar','type' => 'submit','class' => 'btn btn-primary','content' =>'Consultar');
					echo form_button($data);
				?>
				<a id="cancelar" href="<?php echo base_url('index.php/processos/consulta');?>" class="btn btn-default"></span>Cancelar</a>
				</div>
				</div>

				<?php echo form_close(); ?>
			</fieldset>
			
		</div>
		<script language="javascript" type="text/javascript">
			$(document).ready(function(){//Equivalente ao window.onload porem mais rapido
				$( "#inicio" ).datepicker({
				  dateFormat: "dd/mm/yy",
				  defaultDate: "-1m",
				  changeMonth: true,
				  numberOfMonths: 4,
				  showButtonPanel: true,
				  onClose: function( selectedDate ) {
					$( "#fim" ).datepicker( "option", "minDate", selectedDate );
				  }
				});
				$( "#fim" ).datepicker({
				  dateFormat: "dd/mm/yy",
				  //defaultDate: "+1w",
				  changeMonth: true,
				  numberOfMonths: 4,
				   showButtonPanel: true,
				  onClose: function( selectedDate ) {
					$( "#inicio" ).datepicker( "option", "maxDate", selectedDate );
				  }
				});
				$("#form").validate({
					rules: {
					/*	local: "required",
						usuario: "required",*/
						inicio: "required",
						fim: "required"//,
						//status: "required"
					},
					messages: {
						/*local: "Campo requerido",
						usuario: "Campo requerido",*/
						inicio: "Campo requerido",
						fim: "Campo requerido"/*,
						status: "Campo requerido"*/
					}
				});
			});
		</script>
	</body>
</html>